package org.xjc.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.xjc.utils.IdBoot;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author : XJC
 * @Description :基本的实体类
 * @create : 2022/8/3 14:09
 */
@MappedSuperclass
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "ID",columnDefinition = "varchar2(64)")
    @KeySql(genId = IdBoot.class)
    private String id;

    @Column(name = "GMT_CREATE",columnDefinition = "date")
    @TableField("GMT_CREATE")
    private Date gmtCreate;

    @Column(name = "NAME_CREATE",columnDefinition = "varchar2(128)")
    @TableField("NAME_CREATE")
    private String nameCreate;

    @Column(name = "GMT_MODIFIED",columnDefinition = "date")
    @TableField("GMT_MODIFIED")
    private Date gmtModified;

    @Column(name = "NAME_MODIFIED",columnDefinition = "varchar2(128)")
    @TableField("NAME_MODIFIED")
    private String nameModified;

    @Column(name = "IS_DELETED",columnDefinition = "number(1)")
    @TableField("IS_DELETED")
    private Integer isDeleted = 0;

}
